// File:    Convenio.cs
// Author:  Lucas Bittencourt
// Created: quarta-feira, 16 de novembro de 2011 18:32:47
// Purpose: Definition of Class Convenio

using System;
using System.Text;

namespace DA_OOMModel
{
   [Serializable]
   public class ConvenioPK
   {
      public int cvnIdConvenio;
   
      /// <summary>
      /// Empty constructor
      /// </summary>
      public ConvenioPK()
      { 
         //Todo: add your code here
      }
   
      /// <summary>
      /// Constructor with parameters
      /// </summary>
      
      /// <param name="cvnIdConvenio">Parameter to set value of field cvnIdConvenio</param>
      public ConvenioPK(int cvnIdConvenio) 
      {
      
         this.cvnIdConvenio = cvnIdConvenio;
      }
   
      /// <summary>
      /// Get value of property CvnIdConvenio.
      /// </summary>
      public int CvnIdConvenio
      {
         get
         {
            return cvnIdConvenio;
         }
         set
         {
            if (this.cvnIdConvenio != value)
               this.cvnIdConvenio = value;
         }
      }
   
      /// <summary>
      /// Test if two objects are equal
      /// </summary>
      /// <param name="object">Object to compare</param>
      public override bool Equals(object obj) 
      {
         if (obj == null) 
            return false;
         if (obj == this) 
            return true;
         if (!(obj.GetType() == GetType()))
            return false;
      
         ConvenioPK cast = (ConvenioPK) obj;
      
         if (this.cvnIdConvenio != cast.CvnIdConvenio)
            return false;
      
         return true;
      }
   
      /// <summary>
      /// Get hash code
      /// </summary>
      public override int GetHashCode()
      {
         int _hashCode = 0;
         _hashCode += 29 * cvnIdConvenio.GetHashCode();
         return _hashCode;
      }
   
      /// <summary>
      /// Get object in string format
      /// </summary>
      public override string ToString()
      {
         StringBuilder ret = new StringBuilder();
         ret.Append( "ConvenioPK: " );
         ret.Append( "CvnIdConvenio='" + cvnIdConvenio + "'");
         return ret.ToString();
      }
   }
}